import { Button } from "antd";
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';

import { showButton } from "@/common/commonAction";

/**
 * @description 根据传入的menuType决定使用哪个tablePanelConfig 
 */
const getActionPanel = ({ loading, menuCode, getData = Function, setShow = Function, buttonList = Array, onEdit = Function, onDelete = Function, upGetChecks = Function }) => {

    // 默认的panel配置  auth 
    const defaultPanel = [
        {
            auth: true,
            component: (newSelectRows = [], key) => <Button key={key}
                disabled={newSelectRows.length >= 1 ? false : true}
                onClick={() => {
                    upGetChecks(newSelectRows)
                }}
                type="primary" icon={<EditOutlined />} >确认选择</Button>
        }
    ]


    switch (menuCode) {

        default: return defaultPanel;
    }


}




export default getActionPanel;